#ifndef LATTICE_HEADER_VIZMF_PROJECT
#define LATTICE_HEADER_VIZMF_PROJECT

#include <string>
#include <vector>

class Group;
#include "src/core/generic/vector3.h"	// for a given (but most common) implementation

/*
  VizMF Lattice class
*/

class Lattice {
public:
  typedef unsigned int int_type;
  typedef std::string string;
  typedef Vector3 point_type;
private:
  typedef std::vector<point_type> VP;
public:
//  looks like only const iterators are needed
//  typedef VP::iterator points_iterator;
  typedef VP::const_iterator points_const_iterator;

public:
// todo: member functions go here
  //  Lattice(const Group* group = 0, const int_type number = 0, const string name = string())
  //    : number_(number), name_(name), group_(group) {}
  Lattice(const int_type number = 0, const string name = string())
    : number_(number), name_(name) {}

  void setNumber(int_type n) { number_ = n; }
  int_type number() const { return number_; }

  void setName(const string& s) { name_ = s; }
  const string& name() const { return name_; }

//  void setGroup(const Group* g) { group_ = g; }
//  const Group* group() const { return group_; }

  void addPoint(const point_type& point) { points_.push_back(point); }
//  points_iterator removePoint(points_iterator pos) { return points_.erase(pos); }
//  points_iterator removePoints(points_iterator from, points_iterator to) { return points_.erase(from, to); }
//  points_iterator pointsBegin() { return points_.begin() ; }
//  points_iterator pointsEnd() { return points_.end(); }
  points_const_iterator pointsBegin() const { return points_.begin() ; }
  points_const_iterator pointsEnd() const { return points_.end(); }

  int_type count() const { return points_.size(); }
  point_type operator [] (const int_type i) const { return points_[i]; }

  void reserve(const int_type n) {points_.reserve(n);}

private:
  int_type number_;
  string name_;
//  const Group * group_;
  VP points_;
};

#endif // LATTICE_HEADER_VIZMF_PROJECT
